<?php
namespace API\Controller;
use Think\Controller;
/**
* 培训模块
*/
class TrainingController extends PublicController
{
	
	public function traininglist(){
		if ($_SERVER['REQUEST_METHOD']=="POST") {
        $page = isset($_POST['page']) ? $_POST['page'] : 1;
        $pageSize = isset($_POST['pagesize']) ? $_POST['pagesize'] : 8;
        }else {
        $page = isset($_GET['page']) ? $_GET['page'] : 1;
        $pageSize = isset($_GET['pagesize']) ? $_GET['pagesize'] : 8;
        }
        $offset = ($page - 1) * $pageSize;
        $t = M('Clubclass');
        $traininglist = $t ->order('ccid desc')->limit($offset ." , ".$pageSize)->select();
        $sentdate = array('code'=>200,"traininglist"=>$traininglist);
        return PublicController::yuejian($sentdate);
	}

}